Optimal. Leaf size=81 \[ \frac{g (a+b x)^2 \left (B \log \left (\frac{e (a+b x)}{c+d x}\right )+A\right )}{2 b}+\frac{B g (b c-a d)^2 \log (c+d x)}{2 b d^2}-\frac{B g x (b c-a d)}{2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0528924, antiderivative size = 81, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 28, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.107, Rules used = {2525, 12, 43} \[ \frac{g (a+b x)^2 \left (B \log \left (\frac{e (a+b x)}{c+d x}\right )+A\right )}{2 b}+\frac{B g (b c-a d)^2 \log (c+d x)}{2 b d^2}-\frac{B g x (b c-a d)}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2525
Rule 12
Rule 43
Rubi steps
\begin{align*} \int (a g+b g x) \left (A+B \log \left (\frac{e (a+b x)}{c+d x}\right )\right ) \, dx &=\frac{g (a+b x)^2 \left (A+B \log \left (\frac{e (a+b x)}{c+d x}\right )\right )}{2 b}-\frac{B \int \frac{(b c-a d) g^2 (a+b x)}{c+d x} \, dx}{2 b g}\\ &=\frac{g (a+b x)^2 \left (A+B \log \left (\frac{e (a+b x)}{c+d x}\right )\right )}{2 b}-\frac{(B (b c-a d) g) \int \frac{a+b x}{c+d x} \, dx}{2 b}\\ &=\frac{g (a+b x)^2 \left (A+B \log \left (\frac{e (a+b x)}{c+d x}\right )\right )}{2 b}-\frac{(B (b c-a d) g) \int \left (\frac{b}{d}+\frac{-b c+a d}{d (c+d x)}\right ) \, dx}{2 b}\\ &=-\frac{B (b c-a d) g x}{2 d}+\frac{g (a+b x)^2 \left (A+B \log \left (\frac{e (a+b x)}{c+d x}\right )\right )}{2 b}+\frac{B (b c-a d)^2 g \log (c+d x)}{2 b d^2}\\ \end{align*}
Mathematica [A] time = 0.0342394, size = 69, normalized size = 0.85 \[ \frac{g \left ((a+b x)^2 \left (B \log \left (\frac{e (a+b x)}{c+d x}\right )+A\right )+\frac{B (a d-b c) ((a d-b c) \log (c+d x)+b d x)}{d^2}\right )}{2 b} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.158, size = 1544, normalized size = 19.1 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.10547, size = 194, normalized size = 2.4 \begin{align*} \frac{1}{2} \, A b g x^{2} +{\left (x \log \left (\frac{b e x}{d x + c} + \frac{a e}{d x + c}\right ) + \frac{a \log \left (b x + a\right )}{b} - \frac{c \log \left (d x + c\right )}{d}\right )} B a g + \frac{1}{2} \,{\left (x^{2} \log \left (\frac{b e x}{d x + c} + \frac{a e}{d x + c}\right ) - \frac{a^{2} \log \left (b x + a\right )}{b^{2}} + \frac{c^{2} \log \left (d x + c\right )}{d^{2}} - \frac{{\left (b c - a d\right )} x}{b d}\right )} B b g + A a g x \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.05546, size = 278, normalized size = 3.43 \begin{align*} \frac{A b^{2} d^{2} g x^{2} + B a^{2} d^{2} g \log \left (b x + a\right ) -{\left (B b^{2} c d -{\left (2 \, A + B\right )} a b d^{2}\right )} g x +{\left (B b^{2} c^{2} - 2 \, B a b c d\right )} g \log \left (d x + c\right ) +{\left (B b^{2} d^{2} g x^{2} + 2 \, B a b d^{2} g x\right )} \log \left (\frac{b e x + a e}{d x + c}\right )}{2 \, b d^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] time = 4.44988, size = 257, normalized size = 3.17 \begin{align*} \frac{A b g x^{2}}{2} + \frac{B a^{2} g \log{\left (x + \frac{\frac{B a^{3} d^{2} g}{b} + 2 B a^{2} c d g - B a b c^{2} g}{B a^{2} d^{2} g + 2 B a b c d g - B b^{2} c^{2} g} \right )}}{2 b} - \frac{B c g \left (2 a d - b c\right ) \log{\left (x + \frac{3 B a^{2} c d g - B a b c^{2} g - B a c g \left (2 a d - b c\right ) + \frac{B b c^{2} g \left (2 a d - b c\right )}{d}}{B a^{2} d^{2} g + 2 B a b c d g - B b^{2} c^{2} g} \right )}}{2 d^{2}} + \left (B a g x + \frac{B b g x^{2}}{2}\right ) \log{\left (\frac{e \left (a + b x\right )}{c + d x} \right )} + \frac{x \left (2 A a d g + B a d g - B b c g\right )}{2 d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.80428, size = 150, normalized size = 1.85 \begin{align*} \frac{B a^{2} g \log \left (b x + a\right )}{2 \, b} + \frac{1}{2} \,{\left (A b g + B b g\right )} x^{2} + \frac{1}{2} \,{\left (B b g x^{2} + 2 \, B a g x\right )} \log \left (\frac{b x + a}{d x + c}\right ) - \frac{{\left (B b c g - 2 \, A a d g - 3 \, B a d g\right )} x}{2 \, d} + \frac{{\left (B b c^{2} g - 2 \, B a c d g\right )} \log \left (d x + c\right )}{2 \, d^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]